# Maintainer:
pkgname=py3-exifread
_pkgname=ExifRead
pkgver=2.3.1
pkgrel=0
pkgdesc="Read Exif metadata from tiff and jpeg files"
options="!check" # No testsuite
url="https://github.com/ianare/exif-py"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
source="$pkgname-$pkgver.tar.gz::https://github.com/ianare/exif-py/archive/$pkgver.tar.gz"

builddir="$srcdir"/exif-py-$pkgver

replaces="py-exifread" # Backwards compatibility
provides="py-exifread=$pkgver-r$pkgrel" # Backwards compatibility

prepare() {
	default_prepare
	sed -i "s/2.1.2/$version/" exifread/__init__.py
}

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="317b4da345ceba9be2b30424b9ab4b81c5f97fcb026414505a2453bea0cd909b1c35ef05b4fd520c9ebaa8369e54c23af3d4b0248eb4261353448640094e825a  py3-exifread-2.3.1.tar.gz"
